Skip to content

chore(promql_utilities): delete five dead types and the logics.rs planner shim - #396

Merged
zzylol merged 1 commit into
mainfrom
chore/retire-dead-promql-utilities-types
Jul 20, 2026
Merged

zzylol merged 1 commit into
mainfrom
chore/retire-dead-promql-utilities-types

Conversation

@zzylol

@zzylol zzylol commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Summary

Stage 2 of the promql_utilities/sketch_algebra retirement plan. Every item deleted here had zero non-test callers anywhere in the workspace (control_plane, data_plane, asap_types) — confirmed by a full-repo call-site audit, not just a local grep.

  • QueryPatternType, PromQLFunction, AggregationOperator: defined, tested, never imported anywhere else. PromQLFunction duplicated work that already happened twice over independently (ASAPController's frontend-promql parses the same function names at L1; data_plane's own backend_storage_routing.rs built its own QueryShape matcher for the same strings).
  • QueryTreatmentType: its one live dependent was a cross-check test in asap_types::capability_matching, superseded by that crate's own AccuracyTarget (Exact/Approximate) which already covers the need.
  • logics.rs (map_statistic_to_precompute_operator, does_precompute_operator_support_subpopulations, get_is_collapsable): dead in production. The docstring's claimed caller, IntermediateAggConfig, doesn't exist anywhere in the Rust codebase — a retired Python-planner relic. Deleted the whole file; asap_types::capability_matching::compatible_agg_types is now the sole source of truth for (Statistic, AggregationType) compatibility, no second table to keep in agreement with.
  • Rewrote/removed the capability_canonical_map_agreement test (its entire premise — two independently-maintained tables that must agree — no longer applies now that only one table exists) and fixed the stale doc-comment cross-references to the deleted function.

No behavior change anywhere.

Test plan

  • cargo build --workspace — clean
  • cargo test -p promql_utilities -p asap_types -p control_plane — all green (828 passed, 1 known pre-existing unrelated failure: invalid_sketch_type_override_falls_back_to_default)
  • cargo build -p data_plane — clean
  • Diff scoped to only the files touched — no incidental reformatting

🤖 Generated with Claude Code

…nner shim

Stage 2 of the promql_utilities/sketch_algebra retirement plan. Every
item deleted here had zero non-test callers anywhere in the workspace
(control_plane, data_plane, asap_types) -- confirmed by a full-repo
call-site audit, not just a local grep.

- QueryPatternType, PromQLFunction, AggregationOperator: defined,
  tested, never imported anywhere else. PromQLFunction duplicated work
  that already happened twice over independently (ASAPController's
  frontend-promql parses the same function names at L1; data_plane's
  own backend_storage_routing.rs built its own QueryShape matcher for
  the same strings).
- QueryTreatmentType: its one live dependent was a cross-check test in
  asap_types::capability_matching, superseded by that crate's own
  AccuracyTarget (Exact/Approximate) which already covers the need.
- logics.rs (map_statistic_to_precompute_operator,
  does_precompute_operator_support_subpopulations, get_is_collapsable):
  dead in production. The docstring's claimed caller, IntermediateAggConfig,
  doesn't exist anywhere in the Rust codebase -- a retired Python-planner
  relic. Deleted the whole file; asap_types::capability_matching::
  compatible_agg_types is now the sole source of truth for
  (Statistic, AggregationType) compatibility, no second table to keep
  in agreement with.
- Rewrote/removed the capability_canonical_map_agreement test (its
  entire premise -- two independently-maintained tables that must
  agree -- no longer applies now that only one table exists) and fixed
  the stale doc-comment cross-references to the deleted function.

No behavior change anywhere. cargo build --workspace clean;
cargo test -p promql_utilities -p asap_types -p control_plane all green
(828 passed, 1 known pre-existing unrelated failure).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant